<!-- $Id: articlecat_info.htm 16752 2009-10-20 09:59:38Z wangleisvn $ -->
{include file="pageheader.htm"}
<div class="main-div">
<form method="post" action="articlecat.php" name="theForm"  onsubmit="return validate()">
<table cellspacing="1" cellpadding="3" width="100%">
  <tr>
    <td class="label">{$lang.cat_name}</td>
    <td><input type="text" name="cat_name" maxlength="60" size = "30" value="{$cat.cat_name|escape}" />{$lang.require_field}</td>
  </tr>
  <tr>
    <td class="label">{$lang.parent_cat}</td>
    <td>
      <select name="parent_id" onchange="catChanged()" {if $disabled }disabled="disabled"{/if} >
        <option value="0">{$lang.cat_top}</option>
        {$cat_select}
      </select>
    </td>
  </tr>
  <tr>
    <td class="label">{$lang.sort_order}:</td>
    <td>
      <input type="text" name='sort_order' {if $cat.sort_order}value='{$cat.sort_order}'{else} value="50"{/if} size="15" />
    </td>
  </tr>
  <tr>
    <td class="label">{$lang.template}:</td>
    <td>
      <input type="text" name='template' {if $cat.template}value='{$cat.template}'{else} value="article_cat.dwt"{/if} size="30" />
    </td>
  </tr>
  <tr>
    <td class="label">{$lang.article_template}:</td>
    <td>
      <input type="text" name='article_template' {if $cat.article_template}value='{$cat.article_template}'{else} value="article.dwt"{/if} size="30" />
    </td>
  </tr>
	<tr>
    <td class="label">{$lang.show_in_nav}:</td>
    <td>
      <input type="radio" name="show_in_nav" value="1" {if $cat.show_in_nav neq 0} checked="true"{/if}/> {$lang.yes}
      <input type="radio" name="show_in_nav" value="0" {if $cat.show_in_nav eq 0} checked="true"{/if} /> {$lang.no}
    </td>
  </tr>
	<tr>
    <td class="label">{$lang.show_urhere}:</td>
    <td>
      <input type="radio" name="show_urhere" value="1" {if $cat.show_urhere neq 0} checked="true"{/if}/> {$lang.yes}
      <input type="radio" name="show_urhere" value="0" {if $cat.show_urhere eq 0} checked="true"{/if} /> {$lang.no}
    </td>
  </tr>
	<tr>
    <td class="label">{$lang.show_type}:</td>
    <td>
      <input type="radio" name="show_type" value="1" {if $cat.show_type neq 0} checked="true"{/if}/> {$lang.yes}
      <input type="radio" name="show_type" value="0" {if $cat.show_type eq 0} checked="true"{/if} /> {$lang.no}
    </td>
  </tr>
  <tr>
    <td class="label">{$lang.page_size}:</td>
    <td>
      <input type="text" name='page_size' {if $cat.page_size}value='{$cat.page_size}'{/if} size="30" />
    </td>
  </tr>
  <tr>
    <td class="label"><a href="javascript:showNotice('notice_keywords');" title="{$lang.form_notice}">
        <img src="images/notice.gif" width="16" height="16" border="0" alt="{$lang.form_notice}"></a>{$lang.cat_keywords}</td>
    <td><input type="text" name="keywords" maxlength="60" size="50" value="{$cat.keywords|escape}" />
    <br /><span class="notice-span" {if $help_open}style="display:block" {else} style="display:none" {/if} id="notice_keywords">{$lang.notice_keywords}</span>
    </td>
  </tr>
  <tr>
    <td class="label">{$lang.cat_user}:</td>
    <td>
      <input type="text" name='cat_user' {if $cat.cat_user}value='{$cat.cat_user}'{/if} size="30" />
			<input type="button" name='apply_sub_cat' value='{$lang.apply_sub_cat}' onclick='applySubCat()' />
    </td>
  </tr>
  <tr>
    <td class="label">{$lang.cat_url}:</td>
    <td>
      <input type="text" name='cat_url' {if $cat.cat_url}value='{$cat.cat_url}'{/if} size="30" />
    </td>
  </tr>
  <tr>
    <td class="label">{$lang.cat_desc}</td><td></td>
  </tr>
  <tr>
    <td colspan="2">{$FCKeditor}</td>
  </tr>
  <tr>
    <td colspan="2" align="center"><br />
      <input type="submit" class="button" value="{$lang.button_submit}" />
      <input type="reset" class="button" value="{$lang.button_reset}" />
      <input type="hidden" name="act" value="{$form_action}" />
      <input type="hidden" name="id" value="{$cat.cat_id}" />
      <input type="hidden" name="old_catname" value="{$cat.cat_name}" />
    </td>
  </tr>
</table>
</form>
</div>
<script type="text/javascript" src="../js/utils.js"></script>
<script type="text/javascript" src="../js/validator.js"></script>
{literal}
<script language="JavaScript">
<!--
function validate()
{
    validator = new Validator("theForm");
    validator.required("cat_name",  no_catname);
    return validator.passed();
}

function catChanged()
{
  var obj = document.forms['theForm'].elements['parent_id'];

  cat_type = obj.options[obj.selectedIndex].getAttribute('cat_type');
  if (cat_type == undefined)
  {
    cat_type = 1;
  }

  if ((obj.selectedIndex > 0) && (cat_type == 2 || cat_type == 3 || cat_type == 5))
  {
    alert(sys_hold);
    obj.selectedIndex = 0;
    return false;
  }

  return true;
}

function applySubCat(){
	jQuery.get('articlecat_ajax.php', { act: "apply_sub_cat", id: "{$cat.cat_id}",user: "{$cat.cat_user}" }, function(data){
		alert(data);
	});
}

onload = function()
{
    startCheckOrder();
}
//-->
</script>
{/literal}
{include file="pagefooter.htm"}